home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / src / gcc-263 / makefile < prev    next >
Encoding:
Makefile  |  1994-12-19  |  85.6 KB  |  2,297 lines

  1. # Makefile generated by "configure.bat"
  2. all.dos: cccp cc1 cc1obj xgcc libgcc.a s-objlist 
  3. # Makefile for GNU C compiler.
  4. #   Copyright (C) 1987, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
  5.  
  6. #This file is part of GNU CC.
  7.  
  8. #GNU CC is free software; you can redistribute it and/or modify
  9. #it under the terms of the GNU General Public License as published by
  10. #the Free Software Foundation; either version 2, or (at your option)
  11. #any later version.
  12.  
  13. #GNU CC is distributed in the hope that it will be useful,
  14. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. #GNU General Public License for more details.
  17.  
  18. #You should have received a copy of the GNU General Public License
  19. #along with GNU CC; see the file COPYING.  If not, write to
  20. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. # The targets for external use include:
  23. # all, doc, proto, install, install-cross, install-cross-rest,
  24. # uninstall, TAGS, mostlyclean, clean, distclean, realclean,
  25. # stage1, stage2, stage3, stage4.
  26.  
  27. # Suppress smart makes who think they know how to automake Yacc files
  28. .y.c:
  29.  
  30. # Variables that exist for you to override.
  31. # See below for how to change them for certain systems.
  32.  
  33. # List of language subdirectories.
  34. # This is overridden by configure.
  35. SUBDIRS =
  36.  
  37. # Selection of languages to be made.
  38. # This is overridden by configure.
  39. LANGUAGES = c objective-c proto
  40.  
  41. ALLOCA =
  42. ALLOCA_FLAGS =
  43. ALLOCA_FINISH = true
  44.  
  45. # Various ways of specifying flags for compilations:  
  46. # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
  47. # BOOT_CFLAGS is the value of CFLAGS to pass
  48. # to the stage2 and stage3 compilations
  49. # XCFLAGS is used for most compilations but not when using the GCC just built.
  50. XCFLAGS =
  51. CFLAGS = -g
  52. BOOT_CFLAGS = -O $(CFLAGS)
  53. # These exists to be overridden by the x-* and t-* files, respectively.
  54. X_CFLAGS =
  55. T_CFLAGS =
  56.  
  57. X_CPPFLAGS =
  58. T_CPPFLAGS =
  59.  
  60. CC = gcc
  61. BISON = bison
  62. BISONFLAGS =
  63. LEX = flex
  64. LEXFLAGS =
  65. AR = ar
  66. OLDAR_FLAGS = qc
  67. AR_FLAGS = rc
  68. SHELL = /bin/sh
  69. # on sysV, define this as cp.
  70. INSTALL = install -c
  71. # These permit overriding just for certain files.
  72. INSTALL_PROGRAM = $(INSTALL)
  73. INSTALL_DATA = $(INSTALL)
  74. SYMLINK = ln -s
  75. MAKEINFO = makeinfo
  76. TEXI2DVI = texi2dvi
  77. # For GNUmake: let us decide what gets passed to recursive makes.
  78. MAKEOVERRIDES =
  79.  
  80. # Define this as & to perform parallel make on a Sequent.
  81. # Note that this has some bugs, and it seems currently necessary 
  82. # to compile all the gen* files first by hand to avoid erroneous results.
  83. P =
  84.  
  85. # How to invoke ranlib.
  86. RANLIB = ranlib
  87. # Test to use to see whether ranlib exists on the system.
  88. RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
  89.  
  90. # Compiler to use for compiling libgcc1.a.
  91. # OLDCC should not be the GNU C compiler,
  92. # since that would compile typical libgcc1.a functions such as mulsi3
  93. # into infinite recursions.
  94. OLDCC = gcc
  95.  
  96. # CFLAGS for use with OLDCC, for compiling libgcc1.a.
  97. # NOTE: -O does not work on some Unix systems!
  98. CCLIBFLAGS = -O
  99.  
  100. # Version of ar to use when compiling libgcc1.a.
  101. OLDAR = ar
  102.  
  103. # Target to use when installing include directory.  Either
  104. # install-headers-tar or install-headers-cpio.
  105. INSTALL_HEADERS_DIR = install-headers-tar
  106.  
  107. # The GCC to use for compiling libgcc2.a, enquire, and cross-test.
  108. # Usually the one we just built.
  109. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  110. GCC_FOR_TARGET = gcc
  111.  
  112. # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  113. # It omits XCFLAGS, and specifies -B./.
  114. # It also specifies -I./include to find, e.g., stddef.h.
  115. GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include
  116.  
  117. # Special flags for compiling enquire.
  118. # We disable optimization to make floating point more reliable.
  119. ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
  120. ENQUIRE_LDFLAGS = $(LDFLAGS)
  121.  
  122. # Tools to use when building a cross-compiler.
  123. # These are used because `configure' appends `cross-make'
  124. # to the makefile when making a cross-compiler.
  125.  
  126. TARGET_TOOLPREFIX = $(tooldir)/bin/
  127. AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
  128. AR_FOR_TARGET_FLAGS = rc
  129. RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
  130. RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
  131.  
  132. # Dir to search for system headers.  Overridden by cross-make.
  133. SYSTEM_HEADER_DIR = /usr/include
  134.  
  135. # Control whether to run fixproto.
  136. STMP_FIXPROTO = st-fixproto
  137.  
  138. # There may be a premade insn-attrtab.c for this machine.
  139. # (You could rebuild it with genattrtab as usual, but it takes a long time.)
  140. # PREMADE_ATTRTAB is the file name of the file to use.
  141. # PREMADE_ATTRTAB_MD is the md file it corresponds to.
  142. PREMADE_ATTRTAB_MD = Makefile  # Guaranteed not to cmp equal to md.
  143. PREMADE_ATTRTAB = 
  144.  
  145. target=go32
  146. version=2.6.1
  147. mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)\version.c`
  148.  
  149. # Directory where sources are, from where we are.
  150. srcdir = .
  151. # Common prefix for installation directories.
  152. # NOTE: This directory must exist when you start installation.
  153. prefix = /usr/local
  154. # Directory in which to put localized header files. On the systems with
  155. # gcc as the native cc, `local_prefix' may not be `prefix' which is
  156. # `/usr'.
  157. # NOTE: local_prefix *should not* default from prefix.
  158. local_prefix = /usr/local
  159. # Directory in which to put host dependent programs and libraries
  160. exec_prefix = $(prefix)
  161. # Directory in which to put the executable for the command `gcc'
  162. bindir = $(exec_prefix)/bin
  163. # Directory in which to put the directories used by the compiler.
  164. libdir = $(exec_prefix)/lib
  165. # Directory in which the compiler finds executables, libraries, etc.
  166. libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
  167. # Directory in which the compiler finds g++ includes.
  168. gxx_include_dir= $(libdir)/g++-include
  169. # Directory to search for site-specific includes.
  170. includedir = $(local_prefix)/include
  171. # assertdir is overridden in cross-make.
  172. # (But this currently agrees with what is in cross-make.)
  173. assertdir = $(tooldir)/include
  174. # where the info files go
  175. infodir = $(prefix)/info
  176. # Extension (if any) to put in installed man-page filename.
  177. manext = .1
  178. # Directory in which to put man pages.
  179. mandir = $(prefix)/man/man1
  180. # Directory in which to find other cross-compilation tools and headers.
  181. # Used in install-cross.
  182. tooldir = $(exec_prefix)/$(target)
  183. # Dir for temp files.
  184. tmpdir = /tmp
  185.  
  186. # Additional system libraries to link with.
  187. CLIB=
  188.  
  189. # Change this to a null string if obstacks are installed in the
  190. # system library.
  191. OBSTACK=obstack.o
  192.  
  193. # Specify the rule for actually making libgcc.a,
  194. LIBGCC = libgcc.a
  195. # and the rule for installing it.
  196. INSTALL_LIBGCC = install-libgcc
  197.  
  198. # Specify the rule for actually making libgcc1.a.
  199. # The value may be empty; that means to do absolutely nothing
  200. # with or for libgcc1.a.
  201. LIBGCC1 = libgcc1.a
  202.  
  203. # Specify the rule for making libgcc1.a for a cross-compiler.
  204. # The default rule assumes that libgcc1.a is supplied by the user.
  205. CROSS_LIBGCC1 = libgcc1.cross
  206.  
  207. # Specify the rule for actually making libgcc2.a.
  208. LIBGCC2 = libgcc2.a
  209.  
  210. # Options to use when compiling libgcc2.a.
  211. # -g1 causes output of debug info only for file-scope entities.
  212. # we use this here because that should be enough, and also
  213. # so that -g1 will be tested.
  214. LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g1
  215.  
  216. # Additional options to use when compiling libgcc2.a.
  217. # Some targets override this to -Iinclude
  218. LIBGCC2_INCLUDES =
  219.  
  220. # Things which must be built before building libgcc2.a.
  221. # Some targets override this to st-int-hdrs
  222. LIBGCC2_DEPS =
  223.  
  224. # Enquire target (This is a variable so that a target can choose not to
  225. # build it.)
  226. ENQUIRE = enquire
  227.  
  228. # Cross-test target (must also be overridable for a target)
  229. CROSS_TEST = cross-test
  230.  
  231. # List of extra executables that should be compiled for this target machine
  232. # that are used for compiling from source code to object code.
  233. # The rules for compiling them should be in the t-* file for the machine.
  234. EXTRA_PASSES =
  235.  
  236. # Like EXTRA_PASSES, but these are used when linking.
  237. EXTRA_PROGRAMS = 
  238.  
  239. # List of extra object files that should be compiled for this target machine.
  240. # The rules for compiling them should be in the t-* file for the machine.
  241. EXTRA_PARTS =
  242.  
  243. # List of extra object files that should be compiled and linked with
  244. # compiler proper (cc1, cc1obj, cc1plus).
  245. EXTRA_OBJS =
  246.  
  247. # List of additional header files to install.
  248. # Often this is edited directly by `configure'.
  249. EXTRA_HEADERS =
  250.  
  251. # Set this to `ld' to enable use of collect2.
  252. # USE_COLLECT2 =
  253. # It is convenient for configure to add the assignment at the beginning,
  254. # so don't override it here.
  255.  
  256. # List of extra C and assembler files to add to libgcc1.a.
  257. # Assembler files should have names ending in `.asm'.
  258. LIB1FUNCS_EXTRA = 
  259.  
  260. # List of extra C and assembler files to add to libgcc2.a.
  261. # Assembler files should have names ending in `.asm'.
  262. LIB2FUNCS_EXTRA = 
  263.  
  264. # Default float.h source to use for cross-compiler.
  265. CROSS_FLOAT_H=float.h-cross
  266.  
  267. # Program to convert libraries.
  268. LIBCONVERT = 
  269.  
  270. # Control whether header files are installed.
  271. INSTALL_HEADERS=install-headers
  272.  
  273. # Options for tar when copying trees.  So HPUX can override it.
  274. TAROUTOPTS = xpBf
  275.  
  276. # Select which version of fixincludes to use (I.E. regular versus SVR4)
  277. # This value is overridden directly by configure.
  278. FIXINCLUDES=fixincludes
  279.  
  280. # Additional directories of header files to run fixincludes on.
  281. # These should be directories searched automatically by default
  282. # just as /usr/include is.
  283. # *Do not* use this for directories that happen to contain 
  284. # header files, but are not searched automatically by default.
  285. # On most systems, this is empty.
  286. OTHER_FIXINCLUDES_DIRS=
  287.  
  288. # List of things which should already be built whenever we try to use xgcc
  289. # to compile anything (without linking).
  290. GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
  291.  
  292. # List of things which should already be built whenever we try to use xgcc
  293. # to link anything.
  294. GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  295.  
  296. # Directory to link to, when using the target `maketest'.
  297. DIR = ../gcc
  298.  
  299. # Guaranteed to not exist when not passing md through cpp.
  300. # This value is overridden directly by configure.
  301. MD_FILE = md-cpp-not-used
  302.  
  303. # Flags to use when cross-building GCC.
  304. # Prefix to apply to names of object files when using them
  305. # to run on the machine we are compiling on.
  306. HOST_PREFIX=
  307. # Prefix to apply to names of object files when compiling them
  308. # to run on the machine we are compiling on.
  309. # The default for this variable is chosen to keep these rules 
  310. # out of the way of the other rules for compiling the same source files.
  311. HOST_PREFIX_1=loser-
  312. HOST_CC=$(CC)
  313. HOST_CFLAGS=$(ALL_CFLAGS)
  314. HOST_CLIB=$(CLIB)
  315. HOST_LDFLAGS=$(LDFLAGS)
  316. HOST_CPPFLAGS=$(ALL_CPPFLAGS)
  317. HOST_ALLOCA=$(ALLOCA)
  318. HOST_MALLOC=$(MALLOC)
  319. HOST_OBSTACK=$(OBSTACK)
  320.  
  321. # Choose the real default target.
  322. ALL=all.internal
  323.  
  324. # Choose the real install target.
  325. INSTALL_TARGET=install-normal
  326.  
  327. # Source for float.h.  Overridden by cross-make.
  328. FLOAT_H=float.h-nat
  329.  
  330. # Extra symbols for fixproto to define when parsing headers.
  331. FIXPROTO_DEFINES = 
  332.  
  333. # End of variables for you to override.
  334.  
  335. # Definition of `all' is here so that new rules inserted by sed
  336. # do not specify the default target.
  337. # The real definition is under `all.internal' (for native compilers)
  338. # or `all.cross' (for cross compilers).
  339. all: all.indirect
  340.  
  341. # This tells GNU Make version 3 not to put all variables in the environment.
  342. .NOEXPORT:
  343.  
  344. # sed inserts variable overrides after the following line.
  345. ####target overrides
  346. ####host overrides
  347. ####cross overrides
  348. ####build overrides
  349.  
  350. # Now figure out from those variables how to compile and link.
  351.  
  352. all.indirect: $(ALL)
  353.  
  354. # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
  355. # ??? IN_GCC should be obsolete now.
  356. INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
  357.  
  358. # This is the variable actually used when we compile.
  359. ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
  360.  
  361. # Likewise.
  362. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
  363.  
  364. # Even if ALLOCA is set, don't use it if compiling with GCC.
  365. # USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
  366. # USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
  367. # USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
  368. USE_HOST_OBSTACK=obstack.o
  369. # USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
  370.  
  371. # Dependency on obstack, alloca, malloc or whatever library facilities
  372. # are not installed in the system libraries.
  373. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  374. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  375.  
  376. # Likewise, for use in the tools that must run on this machine
  377. # even if we are cross-building GCC.
  378. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  379. HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
  380.  
  381. # How to link with both our special library facilities
  382. # and the system's installed libraries.
  383. LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
  384.  
  385. # Likewise, for use in the tools that must run on this machine
  386. # even if we are cross-building GCC.
  387. HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC)  \
  388.         $(HOST_CLIB)
  389.  
  390. HOST_RTL = $(HOST_PREFIX)rtl.o
  391. HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
  392. HOST_PRINT = $(HOST_PREFIX)print-rtl.o
  393.  
  394. # Specify the directories to be searched for header files.
  395. # Both . and srcdir are used, in that order,
  396. # so that tm.h and config.h will be found in the compilation
  397. # subdirectory rather than in the source directory.
  398. INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
  399.  
  400. # Always use -I$(srcdir)/config when compiling.
  401. .c.o:
  402.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  403.  
  404. # This tells GNU make version 3 not to export all the variables
  405. # defined in this file into the environment.
  406. .NOEXPORT:
  407.  
  408. # Support for additional languages (other than c and objc).
  409. # ??? objc can be supported this way too (leave for later).
  410.  
  411. # These next lines are overridden by configure.
  412. LANG_MAKEFILES =
  413. LANG_STAGESTUFF =
  414. LANG_DIFF_EXCLUDES =
  415.  
  416. # Flags to pass to recursive makes.
  417. # CC is set by configure.  Hosts without symlinks need special handling
  418. # because we need CC="stage1/xgcc -Bstage1/" to work in the language
  419. # subdirectories.
  420. # ??? The choices here will need some experimenting with.
  421. FLAGS_TO_PASS = \
  422.     "AR_FLAGS=$(AR_FLAGS)" \
  423.     "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
  424.     "BISON=$(BISON)" \
  425.     "BISONFLAGS=$(BISONFLAGS)" \
  426.     "CC=set-by-configure" \
  427.     "CFLAGS=$(CFLAGS)" \
  428.     "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
  429.     "LDFLAGS=$(LDFLAGS)" \
  430.     "LEX=$(LEX)" \
  431.     "LEXFLAGS=$(LEXFLAGS)" \
  432.     "MAKEINFO=$(MAKEINFO)" \
  433.     "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
  434.     "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
  435.     "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
  436.     "SHELL=$(SHELL)" \
  437.     "exec_prefix=$(exec_prefix)" \
  438.     "prefix=$(prefix)" \
  439.     "tooldir=$(tooldir)" \
  440.     "bindir=$(bindir)" \
  441.     "libsubdir=$(libsubdir)"
  442.  
  443. # Lists of files for various purposes.
  444.  
  445. # A list of all the language-specific executables.
  446. # This is overridden by configure.
  447. COMPILERS = cc1 cc1obj
  448.  
  449. # Language-specific object files for C.
  450. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  451.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  452.  
  453. # Language-specific object files for Objective C.
  454. OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
  455.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  456.  
  457. # Files specific to the C interpreter bytecode compiler(s).
  458. BC_OBJS = bc-emit.o bc-optab.o
  459.  
  460. # Language-independent object files.
  461. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  462.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  463.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  464.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  465.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  466.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  467.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  468.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  469.  insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS)
  470.  
  471. # GEN files are listed separately, so they can be built before doing parallel
  472. #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
  473. #  them before rtl.o is compiled.
  474. GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
  475.  
  476. # Files to be copied away after each stage in building.
  477. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  478.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  479.  insn-attr.h insn-attrtab.c insn-opinit.c \
  480.  s-flags s-config s-codes \
  481.  s-output s-recog s-emit s-extract s-peep \
  482.  s-attr s-attrtab s-opinit s-proto \
  483.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  484.  genattrtab genattr genopinit \
  485.  bc-arity.h bc-opcode.h bc-opname.h \
  486.  s-bcarity s-bcopcode s-bcopname \
  487.  bi-arity bi-opcode bi-opname \
  488.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp \
  489.  cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2) \
  490.  $(LANG_STAGESTUFF)
  491.  
  492. # Members of libgcc1.a.
  493. LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
  494.    _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
  495.    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
  496.    _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
  497.    _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
  498.    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
  499.    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
  500.  
  501. # Library members defined in libgcc2.c.
  502. LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
  503.      _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 _ffsdi2 \
  504.     _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
  505.     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
  506.     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
  507.     _fixtfdi _fixunstfdi _floatditf \
  508.     __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete \
  509.     _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh \
  510.     _pure
  511.  
  512. # Header files that are made available under the same name
  513. # to programs compiled with GCC.
  514. USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
  515.     $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
  516.     $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
  517.     $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
  518.     $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-pa.h \
  519.     $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
  520.     $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
  521.     $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS)
  522.  
  523. # The files that "belong" in CONFIG_H are deliberately omitted
  524. # because having them there would not be useful in actual practice.
  525. # All they would do is cause complete recompilation every time
  526. # one of the machine description files is edited.
  527. # That may or may not be what one wants to do.
  528. # If it is, rm *.o is an easy way to do it.
  529. # CONFIG_H = config.h tm.h
  530. CONFIG_H =
  531. RTL_H = rtl.h rtl.def machmode.h machmode.def
  532. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  533. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  534.  
  535. # Language makefile fragments.
  536.  
  537. # The following targets define the interface between us and the languages.
  538. #
  539. # all.build, all.cross, start.encap, rest.encap,
  540. # info, dvi,
  541. # install-normal, install-common, install-info, install-man,
  542. # uninstall, distdir,
  543. # mostlyclean, clean, distclean, extraclean, realclean,
  544. # stage1, stage2, stage3, stage4
  545. #
  546. # Each language is linked in with a series of hooks (since we can't use `::'
  547. # targets).  The name of each hooked is "lang.${target_name}" (eg: lang.info).
  548. # Configure computes and adds these here.
  549.  
  550. ####language hooks
  551.  
  552. # sed inserts language fragments after the following line.
  553. ####language fragments
  554.  
  555. # End of language makefile fragments.
  556.  
  557. # Avoid a lot of time thinking about remaking Makefile.in and *.def.
  558. .SUFFIXES: .in .def
  559.  
  560. Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
  561.    $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) \
  562.    $(LANG_MAKEFILES)
  563.     $(SHELL) config.status
  564.  
  565. all.internal: start.encap rest.encap
  566. # This is what to compile if making a cross-compiler.
  567. # Note that we can compile enquire using the cross-compiler just built,
  568. # although we can't run it on this machine.
  569. all.cross: native gcc-cross specs st-headers $(LIBGCC) $(STMP_FIXPROTO) \
  570.     $(CROSS_TEST) $(ENQUIRE) $(EXTRA_PARTS) lang.all.cross
  571. # This is what to compile if making gcc with a cross-compiler.
  572. all.build: native xgcc $(EXTRA_PARTS) lang.all.build
  573. # This is what must be made before installing GCC and converting libraries.
  574. start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
  575. # These can't be made until after GCC can run.
  576. rest.encap: st-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
  577. # This is what is made with the host's compiler
  578. # whether making a cross compiler or not.
  579. native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
  580.  
  581. # Define the names for selecting languages in LANGUAGES.
  582. C c: cc1
  583. OBJC objc: cc1obj objc-runtime
  584. OBJECTIVE-C objective-c: cc1obj objc-runtime
  585. PROTO: proto
  586.  
  587. # Really, really stupid make features, such as SUN's KEEP_STATE, may force
  588. # a target to build even if it is up-to-date.  So we must verify that
  589. # config.status does not exist before failing.
  590. config.status:
  591.     @if [ ! -f config.status ] ; then \
  592.       echo You must configure gcc.  Look at the INSTALL file for details.; \
  593.       false; \
  594.     else \
  595.       true; \
  596.     fi
  597.  
  598. # On the target machine, finish building a cross compiler.
  599. # This does the things that can't be done on the host machine.
  600. rest.cross: $(LIBGCC) gfloat.h specs
  601.  
  602. # Verify that it works to compile and link cross-test.
  603. # If it does, then there are sufficient replacements for libgcc1.a.
  604. cross-test: cross-test.o native gcc-cross $(LIBGCC) $(GCC_PARTS)
  605.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) cross-test.o -o cross-test
  606. cross-test.o: cross-test.c native gcc-cross
  607.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/cross-test.c
  608.  
  609. # Recompile all the language-independent object files.
  610. # This is used only if the user explicitly asks for it.
  611. compilations: ${OBJS}
  612.  
  613. # Create a list of the language-independent object files so the language
  614. # subdirectories needn't mention their names explicitly.
  615. s-objlist: Makefile $(OBJS) $(BC_OBJS)
  616.     echo.exe -o s-objlist $(addprefix ../,$(OBJS) $(BC_OBJS))
  617.  
  618. # We call this executable `xgcc' rather than `gcc'
  619. # to avoid confusion if the current directory is in the path
  620. # and CC is `gcc'.  It is renamed to `gcc' when it is installed.
  621. xgcc: gcc.o version.o $(LIBDEPS)
  622.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgcc gcc.o version.o $(LIBS)
  623.  
  624. # Dump a specs file to make -B./ read these specs over installed ones.
  625. specs: xgcc
  626.     $(GCC_FOR_TARGET) -dumpspecs > specs
  627.  
  628. # We do want to create an executable named `xgcc', so we can use it to
  629. # compile libgcc2.a.
  630. # Also create gcc-cross, so that install-common will install properly.
  631. gcc-cross: xgcc
  632.     cp xgcc gcc-cross
  633.  
  634. cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  635.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  636.  
  637. cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  638.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  639.  
  640. # Copy float.h from its source.
  641. gfloat.h: $(FLOAT_H)
  642.     cp $(FLOAT_H) gfloat.h
  643.  
  644. # Create float.h source for the native machine.
  645. float.h-nat: enquire
  646.     -./enquire -f > t-float.h
  647.     mv t-float.h float.h-nat
  648.  
  649. # Create a dummy float.h source for a cross-compiler.
  650. float.h-cross:
  651.     echo "#error float.h values not known for cross-compiler" > float.h-cross
  652.  
  653. # Used to compile enquire with standard cc, but have forgotten why.
  654. # Let's try with GCC.
  655. enquire: enquire.o 
  656.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o enquire
  657. enquire.o: $(srcdir)/enquire.c  st-int-hdrs
  658. #    -if [ "$(srcdir)" != "." ]; then rm -f ./enquire.c; else true; fi
  659. #    -cp $(srcdir)/enquire.c . > /dev/null 2>&1
  660. # Breaking this line caused a problem with one version of GNU make.
  661.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
  662.  
  663. # Build the version of limits.h that we will install.
  664. xlimits.h: glimits.h limitx.h limity.h
  665.     if [ -f $(SYSTEM_HEADER_DIR)/limits.h ] ; then \
  666.       cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > xlimits.h; \
  667.     else \
  668.       cat $(srcdir)/glimits.h > xlimits.h; \
  669.     fi
  670.  
  671. # Build libgcc.a
  672.  
  673. libgcc.a : libgcc1.c libgcc2.c mklibgcc
  674.     ./mklibgcc -c
  675.     ./mklibgcc '$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)' libgcc1.c $(LIB1FUNCS)
  676.     ./mklibgcc '$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)' libgcc2.c $(LIB2FUNCS)
  677.     -command /c mklibnow.bat
  678.     -command /c del libgcc.a
  679.     ar rvs libgcc.a lgcctmp/*.o
  680.  
  681. mklibgcc : config/msdos/mklibgcc.c
  682.     gcc $(CFLAGS) $^ -o $@
  683.  
  684.  
  685. # Compiling object files from source files.
  686.  
  687. # Note that dependencies on obstack.h are not written
  688. # because that file is not part of GCC.
  689.  
  690. # C language specific files.
  691.  
  692. c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  693.     $(srcdir)/c-parse.h c-tree.h input.h flags.h
  694.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
  695. $(srcdir)/c-parse.c $(srcdir)/c-parse.h: $(srcdir)/c-parse.y
  696.      $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  697. $(srcdir)/c-parse.y: $(srcdir)/c-parse.in
  698.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  699.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  700.       $(srcdir)/c-parse.in >t-c-parse.y
  701.     update t-c-parse.y $(srcdir)/c-parse.y
  702.  
  703. $(srcdir)/c-gperf.h: $(srcdir)/c-parse.gperf
  704.     gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
  705.        $(srcdir)/c-parse.gperf >t-gperf.h
  706.      $(srcdir)/move-if-change t-gperf.h $(srcdir)/c-gperf.h
  707.  
  708. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  709. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  710. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  711. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \
  712.     input.h flags.h $(srcdir)/c-gperf.h
  713. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  714. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  715. c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H)
  716. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  717.  
  718. # To make a configuration always use collect2, set USE_COLLECT2 to ld.
  719. ld: collect2
  720.     rm -f ld
  721.     ln collect2 ld
  722.  
  723. collect2 : collect2.o version.o $(LIBDEPS)
  724. # Don't try modifying collect2 (aka ld) in place--it might be linking this.
  725.     -rm -f collect2
  726.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS)
  727.  
  728. collect2.o : collect2.c $(CONFIG_H) gstab.h
  729.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
  730.     -DTARGET_MACHINE=\"$(target)\" \
  731.     -c collect2.c
  732.  
  733. # Objective C language specific files.
  734.  
  735. objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  736.    c-tree.h input.h flags.h objc-act.h
  737.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
  738. $(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
  739.      $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
  740. $(srcdir)/objc-parse.y: $(srcdir)/c-parse.in
  741.     sed -e "/^ifc$$/,/^end ifc$$/d" \
  742.       -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
  743.       $(srcdir)/c-parse.in >t-objc-prs.y
  744.     update t-objc-prs.y $(srcdir)/objc-parse.y
  745.  
  746. objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
  747.    flags.h objc-act.h input.h function.h $(srcdir)/c-parse.h
  748.  
  749. # A file used by all variants of C.
  750.  
  751. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  752.  
  753. # Language-independent files.
  754.  
  755. gcc.o: gcc.c $(CONFIG_H) multilib.h 
  756.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  757.   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  758.   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  759.   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  760.   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  761.   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  762.   $(MAYBE_TARGET_DEFAULT) \
  763.   -c gcc.c
  764.  
  765. dumpvers: dumpvers.c
  766.  
  767. version.o: version.c
  768. obstack.o: obstack.c
  769.  
  770. convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
  771.  
  772. tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
  773. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  774. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  775. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  776. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
  777.    insn-attr.h xcoffout.h defaults.h
  778.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  779.       $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \
  780.       -c toplev.c
  781.  
  782. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  783.  
  784. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  785. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  786.  
  787. toplev.o: bytecode.h bc-emit.h
  788. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
  789.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h bytecode.h
  790. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  791.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  792.    recog.h output.h bytecode.h
  793. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  794.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  795.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  796.    bc-emit.h
  797. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
  798.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  799.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  800.    bc-emit.h modemap.def
  801. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  802.    insn-flags.h
  803. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  804.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  805. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  806.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  807. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  808.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
  809. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  810.    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
  811. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  812.    insn-config.h reload.h
  813. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  814.    insn-config.h reload.h output.h defaults.h
  815. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  816. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
  817.    function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
  818.    bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  819. real.o : real.c $(CONFIG_H) $(TREE_H)
  820. getpwd.o : getpwd.c $(CONFIG_H)
  821.  
  822. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  823.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  824.    bytecode.h
  825.  
  826. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  827.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  828. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  829.  
  830. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  831.    insn-config.h recog.h
  832. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  833.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  834. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  835.    integrate.h regs.h flags.h expr.h loop.h
  836. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  837.    basic-block.h regs.h hard-reg-set.h output.h
  838. combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
  839.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  840.    basic-block.h recog.h real.h hard-reg-set.h
  841. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  842.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  843. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  844.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  845. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  846.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  847.  
  848. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  849.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  850. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  851.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  852.    basic-block.h recog.h output.h
  853. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  854.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  855. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  856.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  857.    flags.h output.h
  858. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  859.    flags.h insn-config.h insn-attr.h
  860. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
  861.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  862.    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
  863. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  864.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  865.    insn-flags.h insn-codes.h real.h
  866. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  867.    regs.h hard-reg-set.h flags.h insn-config.h
  868.  
  869. aux-output.o : aux-output.c $(CONFIG_H) \
  870.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  871.    insn-flags.h output.h insn-attr.h insn-codes.h
  872.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  873.      $(MAYBE_TARGET_DEFAULT) aux-output.c
  874.  
  875. # Build auxiliary files that support ecoff format.
  876. mips-tfile: mips-tfile.o version.o $(LIBDEPS)
  877.     $(CC) $(CFLAGS) $(LDFLAGS) -o mips-tfile mips-tfile.o version.o $(LIBS)
  878.  
  879. mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
  880.  
  881. mips-tdump: mips-tdump.o version.o $(LIBDEPS)
  882.     $(CC) $(CFLAGS) $(LDFLAGS) -o mips-tdump mips-tdump.o version.o $(LIBS)
  883.  
  884. mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
  885.  
  886. # Build file to support OSF/rose half-pic format.
  887. halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
  888.  
  889. # Normally this target is not used; but it is used if you
  890. # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
  891. # from the GNU Emacs distribution.
  892. alloca.o:    alloca.c
  893.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
  894.       -c alloca.c
  895.     $(ALLOCA_FINISH)
  896.  
  897. # Generate header and source files from the machine description, 
  898. # and compile them.
  899.  
  900. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  901.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  902.   insn-attr.h insn-attrtab.c
  903.  
  904. # The following pair of rules has this effect:
  905. # genconfig is run only if the md has changed since genconfig was last run;
  906. # but the file insn-config.h is touched only when its contents actually change.
  907.  
  908. # Each of the other insn-* files is handled by a similar pair of rules.
  909.  
  910. # This causes an anomaly in the results of make -n
  911. # because insn-* is older than s-*
  912. # and thus make -n thinks that insn-* will be updated
  913. # and force recompilation of things that depend on it.
  914. # We use move-if-change precisely to avoid such recompilation.
  915. # But there is no way to teach make -n that it will be avoided.
  916.  
  917. # Each of the insn-*.[ch] rules has a semicolon at the end,
  918. # for otherwise the system Make on SunOS 4.1 never tries
  919. # to recompile insn-*.o.  To avoid problems and extra noise from
  920. # versions of make which don't like empty commands (nothing after the
  921. # trailing `;'), we call true for each.
  922.  
  923. insn-config.h: s-config 
  924. s-config : md genconfig $(srcdir)/move-if-change
  925.     go32 genconfig md > t-config.h
  926.     update t-config.h insn-config.h
  927.     touch s-config
  928.  
  929. insn-flags.h: s-flags 
  930. s-flags : md genflags $(srcdir)/move-if-change
  931.     go32 genflags md > t-flags.h
  932.     update t-flags.h insn-flags.h
  933.     touch s-flags
  934.  
  935. insn-codes.h: s-codes 
  936. s-codes : md gencodes $(srcdir)/move-if-change
  937.     go32 gencodes md > t-codes.h
  938.     update t-codes.h insn-codes.h
  939.     touch s-codes
  940.  
  941. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
  942.   insn-config.h insn-flags.h insn-codes.h
  943.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
  944.  
  945. insn-emit.c: s-emit 
  946. s-emit : md genemit $(srcdir)/move-if-change
  947.     go32 genemit md > t-emit.c
  948.     update t-emit.c insn-emit.c
  949.     touch s-emit
  950.  
  951. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
  952.   real.h output.h flags.h
  953.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
  954.  
  955. insn-recog.c: s-recog 
  956. s-recog : md genrecog $(srcdir)/move-if-change
  957.     go32 genrecog md > t-recog.c
  958.     update t-recog.c insn-recog.c
  959.     touch s-recog
  960.  
  961. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  962.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  963.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
  964.  
  965. insn-opinit.c: s-opinit 
  966. s-opinit : md genopinit $(srcdir)/move-if-change
  967.     go32 genopinit md > t-opinit.c
  968.     update t-opinit.c insn-opinit.c
  969.     touch s-opinit
  970.  
  971. insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
  972.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
  973.  
  974. insn-extract.c: s-extract 
  975. s-extract : md genextract $(srcdir)/move-if-change
  976.     go32 genextract md > t-extract.c
  977.     update t-extract.c insn-extract.c
  978.     touch s-extract
  979.  
  980. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
  981.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
  982.  
  983. insn-peep.c: s-peep 
  984. s-peep : md genpeep $(srcdir)/move-if-change
  985.     go32 genpeep md > t-peep.c
  986.     update t-peep.c insn-peep.c
  987.     touch s-peep
  988.  
  989. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  990.      insn-attr.h insn-config.h
  991.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
  992.  
  993. insn-attr.h: s-attr 
  994. s-attr : md genattr $(srcdir)/move-if-change
  995.     go32 genattr md > t-attr.h
  996.     update t-attr.h insn-attr.h
  997.     touch s-attr
  998.  
  999. insn-attrtab.c: s-attrtab 
  1000. s-attrtab : md genattrtab $(srcdir)/move-if-change
  1001.       go32 genattrtab md > t-attrtab.c
  1002.     update t-attrtab.c insn-attrtab.c
  1003.     touch s-attrtab
  1004.  
  1005. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
  1006.     hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
  1007.     insn-codes.h
  1008.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
  1009.  
  1010. insn-output.c: s-output 
  1011. s-output : md genoutput $(srcdir)/move-if-change
  1012.     go32 genoutput md > t-output.c
  1013.     update t-output.c insn-output.c
  1014.     touch s-output
  1015.  
  1016. # Compile the programs that generate insn-* from the machine description.
  1017. # They are compiled with $(HOST_CC), and associated libraries,
  1018. # since they need to run on this machine
  1019. # even if GCC is being compiled to run on some other machine.
  1020.  
  1021. # $(CONFIG_H) is omitted from the deps of the gen*.o
  1022. # because these programs don't really depend on anything 
  1023. # about the target machine.  They do depend on config.h itself,
  1024. # since that describes the host machine.
  1025.  
  1026. # Pass the md file through cpp if the target requests it.
  1027. $(MD_FILE): $(MD_DEPS)
  1028.     rm -f $@
  1029.     $(MD_CPP) $(MD_CPPFLAGS) md.pre-cpp | sed 's/^# /; /g' > $@
  1030.  
  1031. genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
  1032.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \
  1033.       genconfig.o $(HOST_RTL) $(HOST_LIBS)
  1034.  
  1035. genconfig.o : genconfig.c $(RTL_H) hconfig.h
  1036.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
  1037.  
  1038. genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
  1039.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \
  1040.      genflags.o $(HOST_RTL) $(HOST_LIBS)
  1041.  
  1042. genflags.o : genflags.c $(RTL_H) hconfig.h
  1043.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
  1044.  
  1045. gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
  1046.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \
  1047.      gencodes.o $(HOST_RTL) $(HOST_LIBS)
  1048.  
  1049. gencodes.o : gencodes.c $(RTL_H) hconfig.h
  1050.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
  1051.  
  1052. genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1053.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \
  1054.      genemit.o $(HOST_RTL) $(HOST_LIBS)
  1055.  
  1056. genemit.o : genemit.c $(RTL_H) hconfig.h
  1057.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
  1058.  
  1059. genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1060.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genopinit \
  1061.      genopinit.o $(HOST_RTL) $(HOST_LIBS)
  1062.  
  1063. genopinit.o : genopinit.c $(RTL_H) hconfig.h
  1064.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
  1065.  
  1066. genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
  1067.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \
  1068.      genrecog.o $(HOST_RTL) $(HOST_LIBS)
  1069.  
  1070. genrecog.o : genrecog.c $(RTL_H) hconfig.h
  1071.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
  1072.  
  1073. genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
  1074.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \
  1075.      genextract.o $(HOST_RTL) $(HOST_LIBS)
  1076.  
  1077. genextract.o : genextract.c $(RTL_H) hconfig.h insn-config.h
  1078.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
  1079.  
  1080. genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
  1081.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \
  1082.      genpeep.o $(HOST_RTL) $(HOST_LIBS)
  1083.  
  1084. genpeep.o : genpeep.c $(RTL_H) hconfig.h
  1085.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
  1086.  
  1087. genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
  1088.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \
  1089.      genattr.o $(HOST_RTL) $(HOST_LIBS)
  1090.  
  1091. genattr.o : genattr.c $(RTL_H) hconfig.h
  1092.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
  1093.  
  1094. genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
  1095.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \
  1096.      genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
  1097.  
  1098. genattrtab.o : genattrtab.c $(RTL_H) hconfig.h insn-config.h
  1099.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
  1100.  
  1101. genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
  1102.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \
  1103.      genoutput.o $(HOST_RTL) $(HOST_LIBS)
  1104.  
  1105. genoutput.o : genoutput.c $(RTL_H) hconfig.h
  1106.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
  1107.  
  1108. # Compile the libraries to be used by gen*.
  1109. # If we are not cross-building, gen* use the same .o's that cc1 will use,
  1110. # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
  1111. # with the rules for rtl.o, alloca.o, etc.
  1112. $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
  1113.     rm -f $(HOST_PREFIX)rtl.c
  1114.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
  1115.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
  1116.  
  1117. $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
  1118.     rm -f $(HOST_PREFIX)print-rtl.c
  1119.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
  1120.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
  1121.  
  1122. $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
  1123.     rm -f $(HOST_PREFIX)rtlanal.c
  1124.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
  1125.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
  1126.  
  1127. $(HOST_PREFIX_1)alloca.o: alloca.c
  1128.     rm -f $(HOST_PREFIX)alloca.c
  1129.     cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
  1130.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
  1131.  
  1132. $(HOST_PREFIX_1)obstack.o: obstack.c
  1133.     rm -f $(HOST_PREFIX)obstack.c
  1134.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
  1135.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
  1136.  
  1137. $(HOST_PREFIX_1)malloc.o: malloc.c
  1138.     rm -f $(HOST_PREFIX)malloc.c
  1139.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
  1140.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
  1141.  
  1142. # This satisfies the dependency that we get if you cross-compile a compiler
  1143. # that does not need to compile alloca, malloc or whatever.
  1144. $(HOST_PREFIX_1): 
  1145.     touch $(HOST_PREFIX_1)
  1146.  
  1147. # Remake bytecode files.
  1148. # BI_ALL=bi-run.o
  1149. BI_ALL=
  1150. BC_ALL=bc-opname.h bc-opcode.h bc-arity.h
  1151. BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
  1152.  
  1153.  
  1154. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  1155.      bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  1156. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  1157.         bc-opcode.h bc-typecd.h bc-typecd.def
  1158.  
  1159.  
  1160. bytecode: $(BI_ALL) $(BC_ALL)
  1161.  
  1162. bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
  1163.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-arity \
  1164.      bi-arity.o $(BI_OBJ) $(HOST_LIBS)
  1165. bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
  1166.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opcode \
  1167.      bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
  1168. bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
  1169.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opname \
  1170.      bi-opname.o $(BI_OBJ) $(HOST_LIBS)
  1171.  
  1172. bi-run.o:    $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \
  1173.   bc-opname.h bc-arity.h bc-opcode.h
  1174.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/bi-run.c
  1175. $(srcdir)/bi-parser.c $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.y
  1176.      $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  1177. bi-parser.o:    $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h
  1178.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1179.        $(srcdir)/bi-parser.c
  1180. bi-lexer.o:    $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h
  1181.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1182.        $(srcdir)/bi-lexer.c
  1183. bi-arity.o: bi-arity.c $(srcdir)/bi-defs.h hconfig.h
  1184.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1185.        $(srcdir)/bi-arity.c
  1186. bi-opcode.o: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h
  1187.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1188.        $(srcdir)/bi-opcode.c
  1189. bi-opname.o: bi-opname.c $(srcdir)/bi-defs.h hconfig.h
  1190.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1191.        $(srcdir)/bi-opname.c
  1192. bi-reverse.o: bi-reverse.c $(srcdir)/bi-defs.h
  1193.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1194.        $(srcdir)/bi-reverse.c
  1195.  
  1196.  
  1197. bc-arity.h: s-bcarity 
  1198. s-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
  1199.     go32 bi-arity < $(srcdir)\bytecode.def >t-bc-arity.h
  1200.     update t-bc-arity.h bc-arity.h
  1201.     touch s-bcarity
  1202.  
  1203. bc-opcode.h: s-bcopcode 
  1204. s-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
  1205.     go32 bi-opcode < $(srcdir)\bytecode.def >t-bcopcd.h
  1206.     update t-bcopcd.h bc-opcode.h
  1207.     touch s-bcopcode
  1208.  
  1209. bc-opname.h: s-bcopname 
  1210. s-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
  1211.     go32 bi-opname < $(srcdir)\bytecode.def >t-bcopnm.h
  1212.     update t-bcopnm.h bc-opname.h
  1213.     touch s-bcopname
  1214.  
  1215. bytecode.mostlyclean:
  1216.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  1217.  
  1218. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  1219.     -rm -f bi-arity bi-opcode bi-opname bi-lexer
  1220.  
  1221. bytecode.realclean: bytecode.clean
  1222.     -rm -f bi-parser.c bi-parser.h
  1223.  
  1224.  
  1225. # Remake cpp and protoize.
  1226.  
  1227. # Making the preprocessor
  1228. cpp: cccp
  1229.     -rm -f cpp
  1230.     ln cccp cpp
  1231. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  1232.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  1233. cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
  1234.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
  1235. $(srcdir)/cexp.c: $(srcdir)/cexp.y
  1236.      $(BISON) -o cexp.c cexp.y
  1237. cccp.o: cccp.c $(CONFIG_H) pcp.h version.c 
  1238. # The reason we use $(libdir)/g++-include rather than using libsubdir
  1239. # is for compatibility with the current version of libg++.
  1240.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1241.       -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1242.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1243.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1244.       -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1245.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1246.       -c cccp.c
  1247.  
  1248. # Note for the stamp targets, we run the program `true' instead of
  1249. # having an empty command (nothing following the semicolon).
  1250.  
  1251. proto: config.status protoize unprotoize SYSCALLS.c.X
  1252.  
  1253. protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1254.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
  1255.       protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o protoize
  1256. protoize.o: s-proto 
  1257.  
  1258. unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1259.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
  1260.       unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) \
  1261.        -o unprotoize
  1262. unprotoize.o:    s-proto 
  1263.  
  1264. s-proto:    $(srcdir)/protoize.c getopt.h $(CONFIG_H)
  1265.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1266.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1267.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1268.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1269.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1270.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1271.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1272.       -DUNPROTOIZE $(srcdir)/protoize.c
  1273.     mv protoize.o unprotoize.o
  1274.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1275.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1276.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1277.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1278.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1279.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1280.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1281.       $(srcdir)/protoize.c
  1282.     touch s-proto
  1283.  
  1284. getopt.o: $(srcdir)/getopt.c getopt.h
  1285.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
  1286. getopt1.o: $(srcdir)/getopt1.c getopt.h
  1287.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
  1288.  
  1289. # This info describes the target machine, so compile with GCC just built.
  1290. SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) st-int-hdrs
  1291.     -rm -f SYSCALLS.c t-SYSCALLS.s
  1292.     cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
  1293.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1294.       -aux-info $@ -S -o t-SYSCALLS.s SYSCALLS.c
  1295.     -rm -f SYSCALLS.c t-SYSCALLS.s
  1296.  
  1297.  
  1298. test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
  1299.     -rm -f t-proto.[cso]
  1300.     cp $(srcdir)/protoize.c t-proto.c
  1301.     chmod u+w t-proto.c
  1302.     go32 protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1303.       $(CFLAGS) $(INCLUDES) \
  1304.       -DGCC_INCLUDE_DIR=0 \
  1305.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1306.       -DCROSS_INCLUDE_DIR=0 \
  1307.       -DTOOL_INCLUDE_DIR=0 \
  1308.       -DSTD_PROTO_DIR=0" t-proto.c
  1309.     @echo '**********' Expect 400 lines of differences.
  1310.     -diff $(srcdir)/protoize.c t-proto.c > t-proto.diff
  1311.     -wc -l t-proto.diff
  1312.     go32 unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1313.       $(CFLAGS) $(INCLUDES) \
  1314.       -DGCC_INCLUDE_DIR=0 \
  1315.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1316.       -DCROSS_INCLUDE_DIR=0 \
  1317.       -DTOOL_INCLUDE_DIR=0 \
  1318.       -DSTD_PROTO_DIR=0" t-proto.c
  1319.     @echo Expect zero differences.
  1320.     diff $(srcdir)/protoize.c t-proto.c | cat
  1321.     -rm -f t-proto.[cso]
  1322.  
  1323. # Build the include directory.  The stamp files are st-* rather than
  1324. # s-* so that mostlyclean does not force the include directory to
  1325. # be rebuilt.
  1326.  
  1327. # Build the include directory except for float.h (which depends upon
  1328. # enquire).
  1329. st-int-hdrs: st-fixinc $(USER_H) xlimits.h objc-headers
  1330. # Copy in the headers provided with gcc.
  1331. # The sed command gets just the last file name component;
  1332. # this is necessary because VPATH could add a dirname.
  1333. # Using basename would be simpler, but some systems don't have it.
  1334.     objdir=`pwd`; \
  1335.      \
  1336.     for file in $(USER_H); do \
  1337.       realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
  1338.       rm -f $$objdir/include/$$realfile; \
  1339.       cp ginclude/$$realfile $$objdir/include; \
  1340.       chmod a+r $$objdir/include/$$realfile; \
  1341.     done
  1342.     rm -f include/limits.h
  1343.     cp xlimits.h include/limits.h
  1344.     chmod a+r include/limits.h
  1345. # Install the README
  1346.     rm -f include/README
  1347.     cp $(srcdir)/README-fixinc include/README
  1348.     chmod a+r include/README
  1349.     touch st-int-hdrs
  1350.  
  1351. # Build the complete include directory.
  1352. st-headers: st-int-hdrs gfloat.h
  1353.     rm -f include/float.h
  1354.     cp gfloat.h include/float.h
  1355.     chmod a+r include/float.h
  1356.     touch st-headers
  1357.  
  1358. # Build fixed copies of system files.
  1359. st-fixinc: $(srcdir)/$(FIXINCLUDES) gsyslimits.h
  1360.     rm -rf include
  1361.     mkdir include
  1362.     if [ x$(FIXINCLUDES) != xMakefile.in ]; \
  1363.     then \
  1364.       for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
  1365.         if [ -d $$dir ]; \
  1366.         then \
  1367.           $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
  1368.         else true; fi; \
  1369.       done; \
  1370.     else true; \
  1371.     fi
  1372.     rm -f include/syslimits.h
  1373.     if [ -f include/limits.h ]; then \
  1374.       mv include/limits.h include/syslimits.h; \
  1375.     else \
  1376.       cp $(srcdir)/gsyslimits.h include/syslimits.h; \
  1377.     fi
  1378.     chmod a+r include/syslimits.h
  1379.     touch st-fixinc
  1380.  
  1381. # copy objc header files into build directory
  1382. objc-headers: st-fixinc
  1383.     if [ -d include ]; then true; else mkdir include; fi
  1384.     if [ -d objc ]; then true; else mkdir objc; fi
  1385.     thisdir1=`pwd`; \
  1386.     srcdir1=`cd $(srcdir); pwd`; \
  1387.     cd objc; \
  1388.     $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  1389.     srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  1390.     GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  1391.     GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  1392.     touch objc-headers
  1393.  
  1394. # Files related to the fixproto script.
  1395.  
  1396. deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh st-int-hdrs
  1397.     CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
  1398.       export CC; \
  1399.       $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >t-deduced.h
  1400.     mv t-deduced.h deduced.h
  1401.  
  1402. gen-protos: gen-protos.o scan.o $(HOST_LIBDEPS)
  1403.     ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \
  1404.       gen-protos.o scan.o $(HOST_LIBS)
  1405.  
  1406. gen-protos.o: gen-protos.c scan.h hconfig.h
  1407.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
  1408.  
  1409. scan.o: scan.c scan.h hconfig.h
  1410.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
  1411.  
  1412. xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
  1413.     cat deduced.h $(srcdir)/sys-protos.h > fixtmp.c
  1414.     $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE_ -U__WCHAR_TYPE__ -E \
  1415.       | sed -e 's/    / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
  1416.       | ./gen-protos >xsys-protos.h
  1417.     rm -rf fixtmp.c
  1418.  
  1419. fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS)
  1420.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o fix-header \
  1421.       fix-header.o scan-decls.o scan.o $(HOST_LIBS)
  1422.  
  1423. fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h hconfig.h
  1424.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
  1425.  
  1426. scan-decls.o: scan-decls.c scan.h hconfig.h
  1427.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
  1428.  
  1429. # st-fixproto depends on this, not on fix-header directly.
  1430. # The idea is to make sure fix-header gets built,
  1431. # but not rerun fixproto after each stage
  1432. # just because fix-header's mtime has changed.
  1433. fixhdr.ready: fix-header
  1434.     -if [ -f fixhdr.ready ] ; then \
  1435.         true; \
  1436.     else \
  1437.         touch fixhdr.ready; \
  1438.     fi
  1439.  
  1440. # st-headers is to make sure fixincludes has already finished.
  1441. # The if statement is so that we don't run fixproto a second time
  1442. # if it has already been run on the files in `include'.
  1443. st-fixproto: fixhdr.ready fixproto st-headers
  1444.     @echo "Various warnings and error messages from fixproto are normal"
  1445.     -if [ -d include ] ; then true; else mkdir include; fi
  1446.     -if [ -f include/fixed ] ; then true; \
  1447.     else \
  1448.       : This line works around a 'make' bug in BSDI 1.1.; \
  1449.       CPP="$(GCC_FOR_TARGET) -E"; export CPP; \
  1450.         FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
  1451.         $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
  1452.       touch include/fixed; \
  1453.     fi
  1454.     touch st-fixproto
  1455.  
  1456. # Remake the info files.
  1457.  
  1458. doc: info
  1459. info: $(srcdir)/cpp.info $(srcdir)/gcc.info lang.info
  1460.  
  1461. $(srcdir)/cpp.info: cpp.texi
  1462.      $(MAKEINFO) cpp.texi
  1463.  
  1464. $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
  1465.         md.texi rtl.texi tm.texi 
  1466.      $(MAKEINFO) gcc.texi
  1467.  
  1468. dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
  1469.  
  1470. # This works with GNU Make's default rule.
  1471. $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
  1472.         md.texi rtl.texi tm.texi 
  1473.     $(TEXI2DVI) $<
  1474.  
  1475. # This works with GNU Make's default rule.
  1476. $(srcdir)/cpp.dvi: cpp.texi
  1477.     $(TEXI2DVI) $<
  1478.  
  1479. $(srcdir)/INSTALL: install1.texi install.texi
  1480.     $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
  1481.       install1.texi
  1482.  
  1483. # Deletion of files made during compilation.
  1484. # There are four levels of this:
  1485. #   `mostlyclean', `clean', `distclean' and `realclean'.
  1486. # `mostlyclean' is useful while working on a particular type of machine.
  1487. # It deletes most, but not all, of the files made by compilation.
  1488. # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
  1489. # `clean' deletes everything made by running `make all'.
  1490. # `distclean' also deletes the files made by config.
  1491. # `realclean' also deletes everything that could be regenerated automatically.
  1492. # We remove as much from the language subdirectories as we can
  1493. # (less duplicated code).
  1494.  
  1495.  
  1496. mostlyclean: bytecode.mostlyclean lang.mostlyclean
  1497.     -rm -f $(STAGESTUFF)
  1498. # Clean the objc subdir if we created one.
  1499.     if [ -d objc ]; then \
  1500.       srcdir1=`cd $(srcdir); pwd`; \
  1501.       cd objc; $(MAKE) -f $$srcdir1/objc/Makefile mostlyclean; \
  1502.     else true; fi
  1503.     -rm -f libobjc.a
  1504. # Delete the temporary source copies for cross compilation.
  1505.     -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
  1506.     -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
  1507.     -rm -f $(HOST_PREFIX_1)obstack.c 
  1508. # Delete the temp files made in the course of building libgcc.a.
  1509.     -rm -f tmplibgcc* tmpcopy xlimits.h
  1510.     for name in $(LIB1FUNCS); do rm -f $${name}.c; done
  1511. # Delete other temporary files.
  1512.     -rm -f t-float.h t-gcc.xtar.gz
  1513.     -rm -f t-foo1 t-foo2 t-proto.* t-unproto.1 t-SYSCALLS.s
  1514.     -rm -f t-c-parse.y t-objc-prs.y t-gperf.h
  1515. # Delete the stamp files.
  1516.     -rm -f s-* t-*
  1517.     -rm -f */s-* */t-*
  1518. # Delete debugging dump files.
  1519.     -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  1520.     -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
  1521.     -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
  1522.     -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
  1523.     -rm -f */*.sched2 */*.stack
  1524. # Delete some files made during installation.
  1525.     -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
  1526.     -rm -f collect collect2 mips-tfile mips-tdump alloca.s
  1527. # Delete files generated for fixproto
  1528.     -rm -rf fix-header xsys-protos.h deduced.h t-deduced.h \
  1529.       gen-protos fixproto.list fixtmp.* fixhdr.ready
  1530. # Delete unwanted output files from TeX.
  1531.     -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
  1532.     -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
  1533. # Delete sorted indices we don't actually use.
  1534.     -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
  1535. # Delete core dumps.
  1536.     -rm -f core */core
  1537.  
  1538. # Delete all files made by compilation
  1539. # that don't exist in the distribution.
  1540. clean: mostlyclean bytecode.clean lang.clean
  1541. # It may not be quite desirable to delete unprotoize.c here,
  1542. # but the spec for `make clean' requires it.
  1543. # Using unprotoize.c is not quite right in the first place, 
  1544. # but what better way is there?
  1545.     -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready
  1546.     -rm -f libgcc1.null $(LIB2FUNCS_EXTRA)
  1547.     -rm -f *.dvi
  1548.     -rm -f */*.dvi
  1549.     -if [ -f md.pre-cpp ]; then \
  1550.       rm -f md ; \
  1551.     fi
  1552. # Delete the include directory.
  1553.     -rm -rf st-* include objc-headers
  1554.     -rm -f */st-*
  1555. # Delete files used by the "multilib" facility (including libgcc subdirs).
  1556.     -rm -f multilib.h tmpmultilib*
  1557.     -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
  1558.       rm -rf $(MULTILIB_DIRNAMES); \
  1559.     else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
  1560.       rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
  1561.     fi ; fi
  1562.  
  1563. # Delete all files that users would normally create
  1564. # while building and installing GCC.
  1565. distclean: clean bytecode.distclean lang.distclean
  1566.     -rm -f tm.h aux-output.c config.h config.status tconfig.h hconfig.h
  1567.     -rm -f md md.pre-cpp
  1568.     -rm -f Makefile *.oaux
  1569.     -rm -fr stage1 stage2 stage3 stage4
  1570.     -rm -f */stage1 */stage2 */stage3 */stage4 */include
  1571.     -rm -f objc-parse.output
  1572.     -rm -f c-parse.output
  1573.  
  1574. # Delete anything likely to be found in the source directory
  1575. # that shouldn't be in the distribution.
  1576. extraclean: distclean lang.extraclean
  1577.     -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
  1578.     -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
  1579.     -rm -f config/*/=* config/*/"#"* config/*/*~*
  1580.     -rm -f config/*/*.orig config/*/*.rej
  1581.     -rm -f *.dvi *.oaux *.d *.[zZ] *.gz
  1582.     -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
  1583.     -rm -f *lose config/*lose config/*/*lose
  1584.     -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
  1585.     -rm -f */=* */"#"* */*~*
  1586.     -rm -f */patch* */*.orig */*.rej
  1587.     -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
  1588.     -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
  1589.     -rm -f */*lose */*.s */*.s[0-9] */*.i
  1590.  
  1591. # Get rid of every file that's generated from some other file.
  1592. # Most of these files ARE PRESENT in the GCC distribution.
  1593. realclean: distclean bytecode.realclean lang.realclean
  1594.     -rm -f c-parse.y c-gperf.h objc-parse.y
  1595.     -rm -f objc-parse.c objc-parse.output
  1596.     -rm -f c-parse.c c-parse.h c-parse.output
  1597.     -rm -f cexp.c cexp.output TAGS 
  1598.     -rm -f cpp.info* cpp.??s cpp.*aux
  1599.     -rm -f gcc.info* gcc.??s gcc.*aux
  1600.  
  1601. # Entry points `install' and `uninstall'.
  1602. # Also use `install-collect2' to install collect2 when the config files don't.
  1603.  
  1604. # The semicolon is to prevent the install.sh -> install default rule
  1605. # from doing anything.  Having it run true helps avoid problems and
  1606. # noise from versions of make which don't like to have null commands.
  1607. install: $(INSTALL_TARGET) 
  1608.  
  1609. # Copy the compiler files into directories where they will be run.
  1610. install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
  1611.     install-man install-info lang.install-normal
  1612.  
  1613. # Do nothing while making gcc with a cross-compiler. The person who
  1614. # makes gcc for the target machine has to know how to put a complete
  1615. # gcc together by hand.
  1616. install-build: force
  1617.     @echo You have to install gcc on your target machine by hand.
  1618.  
  1619. # Run this on the target machine
  1620. # to finish installation of cross compiler.
  1621. install-cross-rest: install-float-h-cross
  1622.  
  1623. # Install float.h for cross compiler.
  1624. # Run this on the target machine!
  1625. install-float-h-cross: install-dir
  1626. #    if [ -f enquire ] ; then true; else false; fi
  1627. # Note: don't use -.  We should fail right away if enquire was not made.
  1628.     go32 enquire -f > $(tmpdir)/float.h
  1629.     -rm -f $(libsubdir)/include/float.h
  1630.     $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
  1631.     -rm -f $(tmpdir)/float.h
  1632.     chmod a-x $(libsubdir)/include/float.h
  1633.  
  1634. # Create the installation directory.
  1635. install-dir:
  1636.     -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
  1637.     -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi
  1638. # This dir isn't currently searched by cpp.
  1639. #    -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; fi
  1640.     -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi
  1641.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi
  1642.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
  1643.     -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
  1644.     -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
  1645.     -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi
  1646.     -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi
  1647.     -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
  1648. # We don't use mkdir -p to create the parents of mandir,
  1649. # because some systems don't support it.
  1650. # Instead, we use this technique to create the immediate parent of mandir.
  1651.     -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
  1652.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  1653.     -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
  1654.  
  1655. # Install the compiler executables built during cross compilation.
  1656. install-common: native install-dir xgcc $(EXTRA_PARTS) lang.install-common
  1657.     for file in $(COMPILERS); do \
  1658.       if [ -f $$file ] ; then \
  1659.         rm -f $(libsubdir)/$$file; \
  1660.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  1661.       else true; \
  1662.       fi; \
  1663.     done
  1664.     for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
  1665.       if [ x"$$file" != x.. ]; then \
  1666.         rm -f $(libsubdir)/$$file; \
  1667.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  1668.       else true; fi; \
  1669.     done
  1670.     for file in $(EXTRA_PARTS) ..; do \
  1671.       if [ x"$$file" != x.. ]; then \
  1672.         rm -f $(libsubdir)/$$file; \
  1673.         $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
  1674.       else true; fi; \
  1675.     done
  1676. # Don't mess with specs if it doesn't exist yet.
  1677.     -if [ -f specs ] ; then \
  1678.       rm -f $(libsubdir)/specs; \
  1679.       $(INSTALL_DATA) specs $(libsubdir)/specs; \
  1680.     fi
  1681. # Install the driver program as $(target)-gcc
  1682. # and also as either gcc (if native) or $(tooldir)/bin/gcc.
  1683.     -if [ -f gcc-cross ] ; then \
  1684.       rm -f $(bindir)/$(target)-gcc; \
  1685.       $(INSTALL_PROGRAM) gcc-cross $(bindir)/$(target)-gcc; \
  1686.       if [ -d $(tooldir)/bin/. ] ; then \
  1687.         rm -f $(tooldir)/bin/gcc; \
  1688.         $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
  1689.       else true; fi; \
  1690.     else \
  1691.       rm -f $(bindir)/gcc; \
  1692.       $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  1693.       rm -f $(bindir)/$(target)-gcc-1; \
  1694.       ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
  1695.       mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
  1696.     fi
  1697. # Install protoize if it was compiled.
  1698.     -if [ -f protoize ]; \
  1699.     then \
  1700.         rm -f $(bindir)/protoize; \
  1701.         $(INSTALL_PROGRAM) protoize $(bindir)/protoize; \
  1702.         rm -f $(bindir)/unprotoize; \
  1703.         $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize; \
  1704.         rm -f $(libsubdir)/SYSCALLS.c.X; \
  1705.         $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
  1706.         chmod a-x $(libsubdir)/SYSCALLS.c.X; \
  1707.     fi
  1708.     -rm -f $(libsubdir)/cpp
  1709.     $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
  1710.  
  1711. # Install the info files.
  1712. install-info: doc install-dir lang.install-info
  1713.     -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
  1714.      for f in cpp.info* gcc.info*; \
  1715.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  1716.     -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
  1717.  
  1718. # Install the man pages.
  1719. install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
  1720.     -rm -f $(mandir)/gcc$(manext)
  1721.     -$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext)
  1722.     -chmod a-x $(mandir)/gcc$(manext)
  1723.     -rm -f $(mandir)/cccp$(manext)
  1724.     -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
  1725.     -chmod a-x $(mandir)/cccp$(manext)
  1726.  
  1727. # Install the library.
  1728. install-libgcc: libgcc.a install-dir
  1729.     -if [ -f libgcc.a ] ; then \
  1730.       rm -f $(libsubdir)/libgcc.a; \
  1731.       $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
  1732.       if $(RANLIB_TEST) ; then \
  1733.         (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
  1734.       chmod a-x $(libsubdir)/libgcc.a; \
  1735.     else true; fi
  1736.  
  1737. # Install multiple versions of libgcc.a.
  1738. install-multilib: st-multilib install-dir
  1739.     for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
  1740.       dir=`echo $$i | sed -e 's/;.*$$//'`; \
  1741.       if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
  1742.       rm -f $(libsubdir)/$${dir}/libgcc.a; \
  1743.       $(INSTALL_DATA) $${dir}/libgcc.a $(libsubdir)/$${dir}/libgcc.a; \
  1744.       if $(RANLIB_TEST); then \
  1745.         (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
  1746.       chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
  1747.     done
  1748.  
  1749. # Install the objc run time library.
  1750. install-libobjc: libobjc.a install-dir
  1751.     -if [ -f libobjc.a ] ; then \
  1752.       rm -f $(libsubdir)/libobjc.a; \
  1753.       $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
  1754.       if $(RANLIB_TEST) ; then \
  1755.         (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
  1756.       chmod a-x $(libsubdir)/libobjc.a; \
  1757.     else true; fi
  1758.  
  1759. # Install all the header files built in the include subdirectory.
  1760. install-headers: install-include-dir $(INSTALL_HEADERS_DIR) install-assert-h
  1761. # Fix symlinks to absolute paths in the installed include directory to
  1762. # point to the installed directory, not the build directory.
  1763.     -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
  1764.     if [ $$? -eq 0 ]; then \
  1765.       dir=`cd include; pwd`; \
  1766.       for i in $$files; do \
  1767.         dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
  1768.         if expr "$$dest" : "$$dir.*" > /dev/null; then \
  1769.           rm -f $(libsubdir)/include/$$i; \
  1770.           ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  1771.         fi; \
  1772.       done; \
  1773.     fi
  1774.  
  1775. # Create or recreate the gcc private include file directory.
  1776. install-include-dir: install-dir
  1777.     -rm -rf $(libsubdir)/include
  1778.     mkdir $(libsubdir)/include
  1779.     -chmod a+rx $(libsubdir)/include
  1780.  
  1781. # Install the include directory using tar.
  1782. install-headers-tar: st-headers $(STMP_FIXPROTO) install-include-dir
  1783.     (cd include; \
  1784.      tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
  1785. # /bin/sh on some systems returns the status of the first tar,
  1786. # and that can lose with GNU tar which always writes a full block.
  1787. # So use `exit 0' to ignore its exit status.
  1788.  
  1789. # Install the include directory using cpio.
  1790. install-headers-cpio: st-headers $(STMP_FIXPROTO) install-include-dir
  1791.     (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
  1792.  
  1793. # Put assert.h where it won't override GNU libc's assert.h.
  1794. # It goes in a dir that is searched after GNU libc's headers;
  1795. # thus, the following conditionals are no longer needed.
  1796. # But it's not worth deleting them now.
  1797. ## Don't replace the assert.h already there if it is not from GCC.
  1798. ## This code would be simpler if it tested for -f ... && ! grep ...
  1799. ## but supposedly the ! operator is missing in sh on some systems.
  1800. install-assert-h: assert.h install-dir
  1801.     if [ -f $(assertdir)/assert.h ]; \
  1802.     then \
  1803.       if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
  1804.         then \
  1805.         rm -f $(assertdir)/assert.h; \
  1806.         $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  1807.         chmod a-x $(assertdir)/assert.h; \
  1808.       else true; \
  1809.       fi; \
  1810.     else \
  1811.       rm -f $(assertdir)/assert.h; \
  1812.       $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  1813.       chmod a-x $(assertdir)/assert.h; \
  1814.     fi
  1815.  
  1816. # Use this target to install the program `collect2' under the name `ld'.
  1817. install-collect2: collect2 install-dir
  1818.     $(INSTALL_PROGRAM) collect2 $(libsubdir)/ld
  1819. # Install the driver program as $(libsubdir)/gcc for collect2.
  1820.     $(INSTALL_PROGRAM) xgcc $(libsubdir)/gcc
  1821.  
  1822. # Cancel installation by deleting the installed files.
  1823. uninstall: lang.uninstall
  1824.     -rm -rf $(libsubdir)
  1825.     -rm -rf $(bindir)/gcc
  1826.     -rm -rf $(bindir)/protoize
  1827.     -rm -rf $(bindir)/unprotoize
  1828.     -rm -rf $(mandir)/gcc$(manext)
  1829.     -rm -rf $(mandir)/cccp$(manext)
  1830.     -rm -rf $(mandir)/protoize$(manext)
  1831.     -rm -rf $(mandir)/unprotoize$(manext)
  1832.  
  1833. # These exist for maintenance purposes.
  1834.  
  1835. # Update the tags table.
  1836. TAGS: force
  1837.                                 \
  1838.     mkdir temp;                            \
  1839.     mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp;        \
  1840.     etags *.y *.h *.c;                        \
  1841.     mv temp/* .;                            \
  1842.     rmdir temp
  1843.  
  1844. # Create the distribution tar file.
  1845. #dist: gcc-$(version).tar.gz
  1846. dist: gcc.xtar.gz
  1847.  
  1848. gcc.xtar.gz: gcc.xtar
  1849.     gzip --best < gcc.xtar > t-gcc.xtar.gz
  1850.     mv t-gcc.xtar.gz gcc.xtar.gz
  1851.  
  1852. #gcc-$(version).tar.gz: gcc-$(version).tar
  1853. #    gzip < gcc-$(version).tar > gcc-$(version).tar.gz
  1854.  
  1855. #gcc-$(version).tar:
  1856. gcc.xtar: distdir
  1857. # Make the distribution.
  1858.     tar -chf gcc.xtar gcc-$(version)
  1859.  
  1860. # This target exists to do the initial work before the language specific
  1861. # stuff gets done.
  1862. distdir-start: doc $(srcdir)/INSTALL c-parse.y $(srcdir)/c-gperf.h objc-parse.y \
  1863.   c-parse.c objc-parse.c cexp.c
  1864.     @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
  1865.     then true; \
  1866.     else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
  1867.     fi
  1868. # Update the version number in README
  1869.     awk '$$1 " " $$2 " " $$3 == "This directory contains" \
  1870.         { $$6 = version; print $$0 } \
  1871.          $$1 " " $$2 " " $$3 != "This directory contains"' \
  1872.       version=$(version) README > tmp.README
  1873.     mv tmp.README README
  1874.     -rm -rf gcc-$(version) tmp    
  1875. # Put all the files in a temporary subdirectory
  1876. # which has the name that we want to have in the tar file.
  1877.     mkdir tmp
  1878.     mkdir tmp/config
  1879.     mkdir tmp/ginclude
  1880.     mkdir tmp/objc
  1881.     for file in *[0-9a-zA-Z+]; do \
  1882.       ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  1883.     done
  1884.     cd config; \
  1885.     for file in *[0-9a-zA-Z+]; do \
  1886.       if test -d $$file && test "$$file" != RCS; then \
  1887.         mkdir ../tmp/config/$$file; \
  1888.         cd $$file; \
  1889.         for subfile in *[0-9a-zA-Z+]; do \
  1890.           ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  1891.           || cp $$subfile ../../tmp/config/$$file; \
  1892.         done; \
  1893.         cd ..; \
  1894.       else \
  1895.         ln $$file ../tmp/config >/dev/null 2>&1 \
  1896.         || cp $$file ../tmp/config; \
  1897.       fi; \
  1898.     done
  1899.     cd ginclude; \
  1900.     for file in *[0-9a-zA-Z+]; do \
  1901.       ln $$file ../tmp/ginclude >/dev/null 2>&1 || cp $$file ../tmp/ginclude; \
  1902.     done
  1903.     cd objc; \
  1904.     for file in *[0-9a-zA-Z+]; do \
  1905.       ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  1906.     done
  1907.     ln .gdbinit tmp
  1908.  
  1909. # Finish making `distdir', after the languages have done their thing.
  1910. distdir-finish:
  1911.     mv tmp gcc-$(version)
  1912. # Get rid of everything we don't want in the distribution.  We'd want
  1913. # this to use Makefile.in, but it doesn't have the `lang.foo' targets
  1914. # expanded.
  1915.     cd gcc-$(version); make extraclean
  1916.  
  1917. distdir: distdir-start lang.distdir distdir-finish
  1918.  
  1919. # make diff oldversion=M.N 
  1920. # creates a diff file between an older distribution and this one.
  1921. # The -P option assumes this is GNU diff.
  1922. diff:
  1923.     diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
  1924.       -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
  1925.       -x TAGS \
  1926.       -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
  1927.       -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
  1928.       $(LANG_DIFF_EXCLUDES) \
  1929.       gcc-$(oldversion) gcc-$(version) > diffs
  1930.  
  1931. # do make -f ../gcc/Makefile maketest DIR=../gcc
  1932. # in the intended test directory to make it a suitable test directory.
  1933. # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  1934. maketest:
  1935.     ln -s $(DIR)/*.[chy] .
  1936.     ln -s $(DIR)/configure .
  1937.     ln -s $(DIR)/*.def .
  1938.     -rm -f =*
  1939.     ln -s $(DIR)/.gdbinit .
  1940.     ln -s $(DIR)/$(FIXINCLUDES) .
  1941.     -ln -s $(DIR)/bison.simple .
  1942.     ln -s $(DIR)/config .
  1943.     ln -s $(DIR)/move-if-change .
  1944. # The then and else were swapped to avoid a problem on Ultrix.
  1945.     if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
  1946.     -rm tm.h aux-output.c config.h md
  1947.     make clean
  1948. # You must then run config to set up for compilation.
  1949.  
  1950. bootstrap: force
  1951. # Only build the C compiler for stage1, because that is the only one that
  1952. # we can guarantee will build with the native compiler, and also it is the
  1953. # only thing useful for building stage2.
  1954.     $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES=c
  1955.     $(MAKE) stage1
  1956. # This used to define ALLOCA as empty, but that would lead to bad results
  1957. # for a subsequent `make install' since that would not have ALLOCA empty.
  1958. # To prevent `make install' from compiling alloca.o and then relinking cc1
  1959. # because alloca.o is newer, we permit these recursive makes to compile
  1960. # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  1961.     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  1962.     $(MAKE) stage2
  1963.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  1964.  
  1965. bootstrap2: force
  1966.     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  1967.     $(MAKE) stage2
  1968.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  1969.  
  1970. bootstrap3: force
  1971.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  1972.  
  1973. # Compare the object files in the current directory with those in the
  1974. # stage2 directory.
  1975.  
  1976. # ./ avoids bug in some versions of tail.
  1977. compare: force
  1978.     for file in *.o; do \
  1979.       tail +16c ./$$file > t-foo1; \
  1980.       tail +16c stage2/$$file > t-foo2 2>/dev/null \
  1981.         && (cmp t-foo1 t-foo2 || echo $$file differs); \
  1982.     done
  1983.     for dir in t-foo $(SUBDIRS); do \
  1984.       if [ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \
  1985.         for file in $$dir/*.o; do \
  1986.           tail +16c ./$$file > t-foo1; \
  1987.           tail +16c stage2/$$file > t-foo2 2>/dev/null \
  1988.             && (cmp t-foo1 t-foo2 || echo $$file differs); \
  1989.         done; \
  1990.       fi; \
  1991.     done
  1992.     -rm -f t-foo*
  1993.  
  1994. # Similar, but compare with stage3 directory
  1995. compare3: force
  1996.     for file in *.o; do \
  1997.       tail +16c ./$$file > t-foo1; \
  1998.       tail +16c stage3/$$file > t-foo2 2>/dev/null \
  1999.         && (cmp t-foo1 t-foo2 || echo $$file differs); \
  2000.     done
  2001.     for dir in t-foo $(SUBDIRS); do \
  2002.       if [ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \
  2003.         for file in $$dir/*.o; do \
  2004.           tail +16c ./$$file > t-foo1; \
  2005.           tail +16c stage3/$$file > t-foo2 2>/dev/null \
  2006.             && (cmp t-foo1 t-foo2 || echo $$file differs); \
  2007.         done; \
  2008.       fi; \
  2009.     done
  2010.     -rm -f t-foo*
  2011.  
  2012. # Compare the object files in the current directory with those in the
  2013. # stage2 directory.  Use gnu cmp (diffutils v2.4 or later) to avoid
  2014. # running tail and the overhead of twice copying each object file.
  2015.  
  2016. gnucompare: force
  2017.     for file in *.o; do \
  2018.       cmp --ignore-initial=16 $$file stage2/$$file || true ; \
  2019.     done
  2020.     for dir in t-foo $(SUBDIRS); do \
  2021.       if [ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \
  2022.         for file in $$dir/*.o; do \
  2023.           cmp --ignore-initial=16 $$file stage2/$$file || true ; \
  2024.         done; \
  2025.       fi; \
  2026.     done
  2027.  
  2028. # Similar, but compare with stage3 directory
  2029. gnucompare3: force
  2030.     for file in *.o; do \
  2031.       cmp --ignore-initial=16 $$file stage3/$$file || true ; \
  2032.     done
  2033.     for dir in t-foo $(SUBDIRS); do \
  2034.       if [ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \
  2035.         for file in $$dir/*.o; do \
  2036.           cmp --ignore-initial=16 $$file stage3/$$file || true ; \
  2037.         done; \
  2038.       fi; \
  2039.     done
  2040.  
  2041. # Copy the object files from a particular stage into a subdirectory.
  2042. stage1-start:
  2043.     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2044.     -for dir in . $(SUBDIRS) ; \
  2045.      do \
  2046.        if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
  2047.      done
  2048.     -mv $(STAGESTUFF) stage1
  2049.     -rm -f stage1/libgcc.a
  2050.     -cp libgcc.a stage1
  2051.     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
  2052. stage1: force stage1-start lang.stage1
  2053.  
  2054. stage2-start:
  2055.     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2056.     -for dir in . $(SUBDIRS) ; \
  2057.      do \
  2058.        if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
  2059.      done
  2060.     -mv $(STAGESTUFF) stage2
  2061.     -rm -f stage2/libgcc.a
  2062.     -cp libgcc.a stage2
  2063.     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
  2064. stage2: force stage2-start lang.stage2
  2065.  
  2066. stage3-start:
  2067.     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2068.     -for dir in . $(SUBDIRS) ; \
  2069.      do \
  2070.        if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
  2071.      done
  2072.     -mv $(STAGESTUFF) stage3
  2073.     -rm -f stage3/libgcc.a
  2074.     -cp libgcc.a stage3
  2075.     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
  2076. stage3: force stage3-start lang.stage3
  2077.  
  2078. stage4-start:
  2079.     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2080.     -for dir in . $(SUBDIRS) ; \
  2081.      do \
  2082.        if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
  2083.      done
  2084.     -mv $(STAGESTUFF) stage4
  2085.     -rm -f stage4/libgcc.a
  2086.     -cp libgcc.a stage4
  2087.     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
  2088. stage4: force stage4-start lang.stage4
  2089.  
  2090. # Copy just the executable files from a particular stage into a subdirectory,
  2091. # and delete the object files.  Use this if you're just verifying a version
  2092. # that is pretty sure to work, and you are short of disk space.
  2093. risky-stage1: force
  2094.     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2095.     -mv $(GCC_PARTS) stage1
  2096.     -rm -f stage1/libgcc.a
  2097.     -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a
  2098.     -make clean
  2099.  
  2100. risky-stage2: force
  2101.     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2102.     -mv $(GCC_PARTS) stage2
  2103.     -rm -f stage2/libgcc.a
  2104.     -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a
  2105.     -make clean
  2106.  
  2107. risky-stage3: force
  2108.     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2109.     -mv $(GCC_PARTS) stage3
  2110.     -rm -f stage3/libgcc.a
  2111.     -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a
  2112.     -make clean
  2113.  
  2114. risky-stage4: force
  2115.     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2116.     -mv $(GCC_PARTS) stage4
  2117.     -rm -f stage4/libgcc.a
  2118.     -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a
  2119.     -make clean
  2120.  
  2121. #In GNU Make, ignore whether `stage*' exists.
  2122. .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
  2123. .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
  2124.  
  2125. force:
  2126. # Top level makefile fragment for GNU C++.
  2127. #   Copyright (C) 1994 Free Software Foundation, Inc.
  2128.  
  2129. #This file is part of GNU CC.
  2130.  
  2131. #GNU CC is free software; you can redistribute it and/or modify
  2132. #it under the terms of the GNU General Public License as published by
  2133. #the Free Software Foundation; either version 2, or (at your option)
  2134. #any later version.
  2135.  
  2136. #GNU CC is distributed in the hope that it will be useful,
  2137. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  2138. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2139. #GNU General Public License for more details.
  2140.  
  2141. #You should have received a copy of the GNU General Public License
  2142. #along with GNU CC; see the file COPYING.  If not, write to
  2143. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  2144.  
  2145. # This file provides the language dependent support in the main Makefile.
  2146. # Each language makefile fragment must provide the following targets:
  2147. #
  2148. # foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
  2149. # foo.info, foo.dvi,
  2150. # foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
  2151. # foo.uninstall, foo.distdir,
  2152. # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean, foo.realclean,
  2153. # foo.stage1, foo.stage2, foo.stage3, foo.stage4
  2154. #
  2155. # where `foo' is the name of the language.
  2156. #
  2157. # It should also provide rules for:
  2158. #
  2159. # - making any compiler driver (eg: g++)
  2160. # - the compiler proper (eg: cc1plus)
  2161. # - define the names for selecting the language in LANGUAGES.
  2162.  
  2163. # Extra flags to pass to recursive makes.
  2164. CXX_FLAGS_TO_PASS = \
  2165.     "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
  2166.     "CXXFLAGS=$(CXXFLAGS)" \
  2167.     "CXX_FOR_TARGET=$(CXX_FOR_TARGET)"
  2168.  
  2169. # Actual names to use when installing a native compiler.
  2170. CXX_INSTALL_NAME = c++
  2171. GXX_INSTALL_NAME = g++
  2172.  
  2173. # Actual names to use when installing a cross-compiler.
  2174. CXX_CROSS_NAME = $(target)-c++
  2175. GXX_CROSS_NAME = $(target)-g++
  2176.  
  2177.  
  2178. # Define the names for selecting c++ in LANGUAGES.
  2179. # Note that it would be nice to move the dependency on g++
  2180. # into the C++ rule, but that needs a little bit of work
  2181. # to do the right thing within all.cross.
  2182. C++ c++: cc1plus
  2183.  
  2184. # Create the compiler driver for g++.
  2185. g++: $(srcdir)/cp/g++.c $(CONFIG_H) $(LIBDEPS)
  2186.     $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++ $(srcdir)/cp/g++.c $(LIBS)
  2187.  
  2188. # Create a version of the g++ driver which calls the cross-compiler.
  2189. g++-cross: $(srcdir)/cp/g++.c
  2190.     $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++-cross \
  2191.        -DGCC_NAME=\"$(GCC_CROSS_NAME)\" $(srcdir)/cp/g++.c version.o $(LIBS)
  2192.  
  2193. CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/decl2.c \
  2194.  $(srcdir)/cp/except.c $(srcdir)/cp/input.c $(srcdir)/cp/pt.c \
  2195.  $(srcdir)/cp/spew.c $(srcdir)/cp/xref.c $(srcdir)/cp/class.c \
  2196.  $(srcdir)/cp/edsel.c $(srcdir)/cp/expr.c $(srcdir)/cp/lex.c \
  2197.  $(srcdir)/cp/ptree.c $(srcdir)/cp/tree.c $(srcdir)/cp/cvt.c \
  2198.  $(srcdir)/cp/errfn.c $(srcdir)/cp/gc.c $(srcdir)/cp/method.c \
  2199.  $(srcdir)/cp/search.c $(srcdir)/cp/typeck.c $(srcdir)/cp/decl.c \
  2200.  $(srcdir)/cp/error.c $(srcdir)/cp/init.c $(srcdir)/cp/parse.y \
  2201.  $(srcdir)/cp/sig.c $(srcdir)/cp/typeck2.c
  2202.  
  2203. cc1plus: $(P) $(CXX_SRCS) $(LIBDEPS) s-objlist c-common.o
  2204.     cd cp; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus
  2205.  
  2206. # Build hooks:
  2207.  
  2208. c++.all.build: g++
  2209. c++.all.cross: g++-cross
  2210. c++.start.encap: g++
  2211. c++.rest.encap:
  2212.  
  2213. c++.info:
  2214. c++.dvi:
  2215.  
  2216. # Install hooks:
  2217. # cc1plus is installed elsewhere as part of $(COMPILERS).
  2218.  
  2219. # Nothing to do here.
  2220. c++.install-normal:
  2221.  
  2222. # Install the driver program as $(target)-g++
  2223. # and also as either g++ (if native) or $(tooldir)/bin/g++.
  2224. c++.install-common:
  2225.     -if [ -f cc1plus ] ; then \
  2226.       if [ -f g++-cross ] ; then \
  2227.         rm -f $(bindir)/$(GXX_CROSS_NAME); \
  2228.         $(INSTALL_PROGRAM) g++-cross $(bindir)/$(GXX_CROSS_NAME); \
  2229.         chmod a+x $(bindir)/$(GXX_CROSS_NAME); \
  2230.         rm -f $(bindir)/$(CXX_CROSS_NAME); \
  2231.         ln $(bindir)/$(GXX_CROSS_NAME) $(bindir)/$(CXX_CROSS_NAME); \
  2232.       else \
  2233.         rm -f $(bindir)/$(GXX_INSTALL_NAME); \
  2234.         $(INSTALL_PROGRAM) g++ $(bindir)/$(GXX_INSTALL_NAME); \
  2235.         chmod a+x $(bindir)/$(GXX_INSTALL_NAME); \
  2236.         rm -f $(bindir)/$(CXX_INSTALL_NAME); \
  2237.         ln $(bindir)/$(GXX_INSTALL_NAME) $(bindir)/$(CXX_INSTALL_NAME); \
  2238.       fi ; \
  2239.     fi
  2240.  
  2241. c++.install-info:
  2242.  
  2243. c++.install-man: $(srcdir)/cp/g++.1
  2244.     -if [ -f cc1plus ] ; then \
  2245.       $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(mandir)/g++$(manext) ; \
  2246.       chmod a-x $(mandir)/g++$(manext) ; \
  2247.     else true; fi
  2248.  
  2249. c++.uninstall:
  2250.     -rm -rf $(bindir)/$(CXX_INSTALL_NAME)
  2251.     -rm -rf $(bindir)/$(CXX_CROSS_NAME)
  2252.     -rm -rf $(bindir)/$(GXX_INSTALL_NAME)
  2253.     -rm -rf $(bindir)/$(GXX_CROSS_NAME)
  2254.     -rm -rf $(mandir)/g++$(manext)
  2255.  
  2256. # Clean hooks:
  2257. # A lot of the ancillary files are deleted by the main makefile.
  2258. # We just have to delete files specific to us.
  2259.  
  2260. c++.mostlyclean:
  2261.     -rm -f cp/*.o
  2262. c++.clean:
  2263. c++.distclean:
  2264.     -rm -f cp/config.status cp/Makefile
  2265.     -rm -f cp/parse.output
  2266. c++.extraclean:
  2267. c++.realclean:
  2268.     -rm -f cp/parse.c cp/parse.h
  2269.  
  2270. # Stage hooks:
  2271. # The main makefile has already created stage?/cp.
  2272.  
  2273. c++.stage1:
  2274.     -mv cp/*.o stage1/cp
  2275. c++.stage2:
  2276.     -mv cp/*.o stage2/cp
  2277. c++.stage3:
  2278.     -mv cp/*.o stage3/cp
  2279. c++.stage4:
  2280.     -mv cp/*.o stage4/cp
  2281.  
  2282. # Maintenance hooks:
  2283.  
  2284. # This target creates the files that can be rebuilt, but go in the
  2285. # distribution anyway.  It then copies the files to the distdir directory.
  2286. c++.distdir:
  2287.     mkdir tmp/cp
  2288.     cd cp ; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) parse.c hash.h
  2289.     cd cp; \
  2290.     for file in *[0-9a-zA-Z+]; do \
  2291.       ln $$file ../tmp/cp >/dev/null 2>&1 || cp $$file ../tmp/cp; \
  2292.     done
  2293. lang.mostlyclean:  c++.mostlyclean     
  2294. lang.clean:  c++.clean     
  2295. lang.distclean:  c++.distclean     
  2296. lang.realclean:  c++.realclean     
  2297.